﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Favourites : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        BLL.Favorites forRep = new BLL.Favorites();
        string author = HttpContext.Current.User.Identity.Name;
        FavoriteList.DataSource = forRep.getFavoriteOfUser(author);
        FavoriteList.DataBind();

        if (FavListDataPager.TotalRowCount <= FavListDataPager.MaximumRows)
            FavListDataPager.Visible = false;

        if (FavListDataPager.TotalRowCount == 0)
            AboutNullMess.Text = "список пуст!";
    }
}